#pragma once

#include "Zone.h"




namespace math
{
   template
   <
      typename float_t
   >
   class PointZone : public Zone<float_t>
   {
   private:

      vector3_t m_position;

   public:

      PointZone(const vector3_t position = vector3_t(0, 0, 0))
         : m_position(position)
      {}

      virtual ~PointZone()
      {}



      /**
       * Get the position of the Zone.
       */
      vector3_t position() const
      {
         return m_position;
      }

      /**
       * Set the position of the Zone.
       */
      void setPosition(const vector3_t& position)
      {
         m_position = position;
      }

      /**
       * Generate a uniformly distributed position within this Zone.
       * Since a PointZone does not have a spatial size, the Zone's center
       * is returned.
       */
      virtual vector3_t generatePosition() const
      {
         return m_position;
      }



      /**
       * Tests if the given particle is within the Zone.
       * A particle on the border is still considered as being
       * "within".
       */
      virtual bool isWithin(const Particle& particle) const
      {
         return false;
      }

      /**
       * Tests if the given particle is outside the Zone.
       * A particle on the border is not considered as being "outside".
       */
      virtual bool isOutside(const Particle& particle) const
      {
         return false;
      }
   };
   ///////////////////////////////////////////////////////////////////////////////////////////////
}
///////////////////////////////////////////////////////////////////////////////////////////////////
